package com.wecon.springdemo.service.impl;

import com.wecon.springdemo.bean.Myuser;
import com.wecon.springdemo.mapper.MyuserMapper;
import com.wecon.springdemo.service.MyuserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author Weikang  Wang
 * @program: com.wecon.springdemo.service.impl
 * @description:
 * @date 2020/4/14 15:37
 */
@Service
public class MyuserServiceImpl implements MyuserService {

    Logger logger = LoggerFactory.getLogger(MyuserServiceImpl.class);

    @Resource
    private MyuserMapper myuserMapper;

    @Override
    @Cacheable(cacheNames = "getMyuserInfo")
    public Myuser getMyuserInfo(Integer userId) {
        logger.info("调用getMyuserInfo,查询userId:{}", userId);
//        myuserMapper.selectByPrimaryKey(userId);

        return null;
    }

}
